package {
	import mz.behaveas.model.spec.*;

/**
 * @author maxim.zaks@gmail.com
 */
public var SpecificationFactorySpec : Object=
{
	description : "This specifications describes SpecificationFactory class.",
	
	expectations : [
	
		{
			description: "Empty object is malformed Specification",
			behaviour: function():*{
				var spec : Specification = SpecificationFactory.createSpec({});
				return spec is MallformedSpecification;
			},
			shouldEqual:true
		},
		{
			description: "Object with no description string is malformed Specification",
			behaviour: function():*{
				var spec : Specification = SpecificationFactory.createSpec({description:12})
				return spec is MallformedSpecification;
			},
			shouldEqual:true
		},
		{
			description: "Object with description string but no expectations Array is malformed Specification",
			behaviour: function():*{
				var spec : Specification = SpecificationFactory.createSpec({description:"test"});
				return spec is MallformedSpecification;
			},
			shouldEqual:true
		},
		{
			description: "Object with description string and expectations array is correct Specification",
			behaviour: function():*{
				var spec : Specification = SpecificationFactory.createSpec({description:"test", expectations:[]});
				return spec is CorrectSpecification;
			},
			shouldEqual:true
		}
	]	
};
}
